<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
    <script type="text/javascript">
        if (window.location.href.indexOf('https') === 0) {
            document.write('<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />');
        }
    </script>
    <link rel="stylesheet" href="css/himp.all.min.css">
    <title>${title!}</title>
</head>

<body>
    <!-- <div>
        <p style="height: 5px"></p>
    </div> -->
    <!-- <script src="./sea.js"></script> -->
    <!-- <script src="./require.js" data-main="./config/requirejs-config" defer async="true" ></script> -->

    <div class="panel panel-primary" style="margin-bottom:10px;">
        <div class="panel-heading row">
                <div class="col-md-4">
                    <h4>${title!}</h4>
                </div>
                <div class="col-md-8">
                    <div class=" pull-right">
                            <!-- <a class="btn btn-primary" href="module/page.html">page</a>
                            <a class="btn btn-auxiliary" href="demos/badge.html">badge</a>
                            <a class="btn btn-success" href="demos/audiojs.html">audiojs</a> -->
                            <a class="btn btn-info ajax" href="./index/dashboard">控制台</a>
                            <a class="btn btn-success ajax" href="./index/running">运行状况信息</a>
                            <a class="btn btn-danger ajax" href="./user/index">控制端帐号注册管理</a>
                            <a class="btn btn-auxiliary ajax" href="./index/log">最新日志</a>
                    </div>
                </div>
        </div>
    </div>

    <div id="content" class="container-fluid" style="height:100%"></div>

    <script src="jquery/jquery-1.12.4.min.js"></script>
    <!-- <script src="./sea-2.2.3.js"></script> -->
    <script src="sea-2.2.3.min.js"></script>
    <script src="config/seajs-config.min.js"></script>

    <script>
        require('jquery', function ($) {
            jQuery(function ($) {
                $(document).on('click', 'a.ajax', function (e) {
                    e.preventDefault();
                    var href = $(this).attr('href');
                    if(!href || href === '#'){return}
                    $.get(href, function (res) {
                        // console.log(res)
                        $('#content').html(res)
                    })
                })
            })
        })
        
        $(document).ready(function () {
        	$.get("./index/dashboard", function (res) {
                // console.log(res)
                $('#content').html(res)
            })
        })
    </script>
</body>

</html>